package com.slz3.business.module.financeManagement.finReconciliationManage.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.financeManagement.finReconciliationManage.domain.FinReconciliationManage;
import com.slz3.business.module.financeManagement.finReconciliationManage.domain.FinReconciliationManageCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class FinReconciliationManageResController extends FinReconciliationManageResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, FinReconciliationManage finReconciliationManage) {
        if (FinReconciliationManageResUnsafeValid.add(req, finReconciliationManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$FinReconciliationManageUpdateLock(req, finReconciliationManage);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        if (FinReconciliationManageResUnsafeValid.delete(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, FinReconciliationManage finReconciliationManage) {
        if (FinReconciliationManageResUnsafeValid.modify(req, finReconciliationManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$FinReconciliationManageUpdateLock(req, finReconciliationManage);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (FinReconciliationManageResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return finReconciliationManageResAtomic.info_$FinReconciliationManageUpdateLock(req);
        if (FinReconciliationManageResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$FinReconciliationManageUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (FinReconciliationManageResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        //
        if (FinReconciliationManageResUnsafeValid.auditSubmit(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        if (FinReconciliationManageResUnsafeValid.audit(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        if (FinReconciliationManageResUnsafeValid.auditReject(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        if (FinReconciliationManageResUnsafeValid.usingEnable(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, FinReconciliationManageCondition finReconciliationManageCondition) {
        if (FinReconciliationManageResUnsafeValid.usingDisable(req, finReconciliationManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$FinReconciliationManageUpdateLock(req, finReconciliationManageCondition);
        }
    }

}
